#if !defined(AFX_TDCENUM_H__5951FDE6_508A_4A9D_A55D_D16EB026AEF7__INCLUDED_)
#define AFX_TDCENUM_H__5951FDE6_508A_4A9D_A55D_D16EB026AEF7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// tdcenum.h : header file
//

#include <afxtempl.h>

enum TDC_INSERTWHERE
{
	TDC_INSERTATTOP,
	TDC_INSERTATBOTTOM,
	TDC_INSERTATTOPOFSELTASKPARENT,
	TDC_INSERTATBOTTOMOFSELTASKPARENT,
	TDC_INSERTAFTERSELTASK,
	TDC_INSERTBEFORESELTASK,
	TDC_INSERTATTOPOFSELTASK, // subtask
	TDC_INSERTATBOTTOMOFSELTASK, // subtask
};

enum TDC_ARCHIVE
{
	TDC_REMOVENONE,
	TDC_REMOVEALL,
	TDC_REMOVEIFSIBLINGSANDSUBTASKSCOMPLETE,
};

enum TDC_STYLE
{
	TDCS_FIRST,

	TDCS_SHOWINFOTIPS = TDCS_FIRST,					
	TDCS_COLORTEXTBYPRIORITY,			
	TDCS_COLORTEXTBYCATEGORY,			
	TDCS_MAXIMIZE,						
	TDCS_SHOWCOMMENTSINLIST,				
	TDCS_SHOWFIRSTCOMMENTLINEINLIST,				
	TDCS_TREATSUBCOMPLETEDASDONE,		
	TDCS_HIDEPERCENTFORDONETASKS,		
	TDCS_CONFIRMDELETE,					
	TDCS_AVERAGEPERCENTSUBCOMPLETION,	
	TDCS_INCLUDEDONEINAVERAGECALC,		
	TDCS_TREECHECKBOXES,					
	TDCS_USEEARLIESTDUEDATE,				
	TDCS_USEPERCENTDONEINTIMEEST,		
	TDCS_SHOWCTRLSASCOLUMNS,				
	TDCS_SHOWCOMMENTSALWAYS,				
	TDCS_AUTOREPOSCTRLS,					
	TDCS_HIDEZEROTIMECOST,				
	TDCS_HIDESTARTDUEFORDONETASKS,		
	TDCS_SHOWPERCENTASPROGRESSBAR,		
	TDCS_READONLY,						
	TDCS_ENABLESOURCECONTROL,			 
	TDCS_CHECKOUTONLOAD,					 
	TDCS_SHOWPATHINHEADER,				
	TDCS_STRIKETHOUGHDONETASKS,			
	TDCS_FULLROWSELECTION,				
	TDCS_COLUMNHEADERCLICKING,			
	TDCS_SORTVISIBLETASKSONLY,			
	TDCS_SHAREDCOMMENTSHEIGHT,
	TDCS_TASKCOLORISBACKGROUND,			
	TDCS_COMMENTSUSETREEFONT,
	TDCS_SHOWDATESINISO,
	TDCS_USEHIGHESTPRIORITY,
	TDCS_AUTOCALCTIMEESTIMATES,
	TDCS_SHOWWEEKDAYINDATES,
	TDCS_ROUNDTIMEFRACTIONS,
	TDCS_SHOWNONFILEREFSASTEXT,
	TDCS_INCLUDEDONEINPRIORITYCALC,		
	TDCS_WEIGHTPERCENTCALCBYTIMEEST,
	TDCS_WEIGHTPERCENTCALCBYPRIORITY,
	TDCS_WEIGHTPERCENTCALCBYNUMSUB,
	TDCS_RIGHTALIGNLABELS,
	TDCS_SHOWPARENTSASFOLDERS,
	TDCS_FOCUSTREEONENTER,
	TDCS_AUTOCALCPERCENTDONE,
	TDCS_TRACKSELECTEDTASKONLY,
	TDCS_HIDEPRIORITYNUMBER,
	TDCS_PAUSETIMETRACKINGONSCRNSAVER,
	TDCS_DISPLAYHMSTIMEFORMAT,
	TDCS_SORTDONETASKSATBOTTOM,
	TDCS_VERTCOMMENTS,
//	TDCS_RIGHTCOMMENTS,
//	TDCS_BOTTOMCOMMENTS,
//	TDCS_BOTTOMRIGHTCOMMENTS,
	TDCS_USEHIGHESTRISK,
	TDCS_INCLUDEDONEINRISKCALC,		
	TDCS_SHOWPROJECTNAME,
	TDCS_LOGTIMETRACKING,
	TDCS_LOGTASKTIMESEPARATELY,
	TDCS_WARNADDDELETEARCHIVE,
	TDCS_SHOWSUBTASKCOMPLETION,
	TDCS_RESORTONMODIFY,
	TDCS_ALLOWPARENTTIMETRACKING,
	TDCS_REFILTERONMODIFY,
	TDCS_AUTOADJUSTDEPENDENTS,

//	TDCS_,
    TDCS_LAST
};

enum TDC_COLUMN
{
	TDCC_CLIENT = 0xffff, // NCG_CLIENTCOLUMNID
	TDCC_FIRST = 0,

	TDCC_PRIORITY = TDCC_FIRST,
	TDCC_PERCENT,
	TDCC_TIMEEST,
	TDCC_TIMESPENT,
	TDCC_STARTDATE,
	TDCC_DUEDATE,
	TDCC_DONEDATE,
	TDCC_ALLOCTO,
	TDCC_ALLOCBY,
	TDCC_STATUS,
	TDCC_CATEGORY,
	TDCC_FILEREF,
	TDCC_POSITION,
	TDCC_ID,
	TDCC_DONE,
	TDCC_TRACKTIME,
	TDCC_FLAG,
	TDCC_CREATIONDATE,
	TDCC_CREATEDBY,
	TDCC_LASTMOD,
	TDCC_RISK,
	TDCC_EXTERNALID,
	TDCC_COST,
	TDCC_DEPENDENCY,
	TDCC_RECURRENCE,
	TDCC_VERSION,

//	TDCC_,
	TDCC_LAST
}; 

typedef CArray<TDC_COLUMN, TDC_COLUMN&> CTDCColumnArray;

enum TDC_GOTO
{
	TDCG_NEXT,
	TDCG_PREV,
};

enum TDC_FILEFMT
{
    TDCFF_OLDER,
    TDCFF_SAME,
    TDCFF_NEWER
};

enum TDC_FILE
{
	TDCO_SUCCESS,
	TDCO_NOTEXIST,
	TDCO_NOTTASKLIST,
	TDCO_NOTALLOWED,
	TDCO_CANCELLED,
	TDCO_BADMSXML,
	TDCO_NOENCRYPTIONDLL,
	TDCO_UNKNOWNENCRYPTION,
	TDCO_INUSE,
	TDCO_OTHER, // always the last value
};
 
enum TDC_FILTER
{
	TDCF_NONE,			// not very useful except to assist coding
	TDCF_ALL,
	TDCF_DUE,			// due today
	TDCF_DUETOMORROW,
	TDCF_DUETHISWEEK,
	TDCF_DUENEXTWEEK,
	TDCF_DUETHISMONTH,
	TDCF_DUENEXTMONTH,
	TDCF_DONE,
	TDCF_NOTDONE,
	TDCF_FULLYDONE,		// used for archiving == all subitems and siblings done
	TDCF_NOTFULLYDONE,	// used for archiving == !(all subitems and siblings done)
};

enum TDC_RESETIDS
{
	TDCR_YES,
	TDCR_NO,
	TDCR_CHECK
};

enum // TDC_GETTASKS
{
    TDCGT_VISIBLECOLSONLY			= 0x0001,
	TDCGT_PARENTTITLECOMMENTSONLY	= 0x0002,
	TDCGT_ISODATES					= 0x0004,
	TDCGT_TITLESONLY				= 0x0008,
	TDCGT_NOTSUBTASKS               = 0x0010,
	TDCGT_HTMLCOMMENTS              = 0x0020,
	TDCGT_KEEPFLAGGED               = 0x0040,
	TDCGT_TRANSFORM                 = 0x0080,
};

enum TDC_DATE
{
	TDCD_CREATE,
	TDCD_START,
	TDCD_DUE,
	TDCD_DONE,
};

// control ids
enum 
{
	IDC_FIRST			= 100,
		
	IDC_TASKLIST,		
	IDC_PROJECTLABEL,	
	IDC_PROJECTNAME,	
	IDC_ALLOCTOLABEL,	
	IDC_ALLOCTO,		
	IDC_ALLOCBYLABEL,	
	IDC_ALLOCBY,		
	IDC_STATUSLABEL,	
	IDC_STATUS,		
	IDC_CATEGORYLABEL,	
	IDC_CATEGORY,		
	IDC_PRIORITYLABEL,	
	IDC_PRIORITY,		
	IDC_STARTLABEL,		
	IDC_STARTDATE,		
	IDC_DUELABEL,		
	IDC_DUEDATE,		
	IDC_PERCENTLABEL,	
	IDC_PERCENT,		
	IDC_PERCENTSPIN,	
	IDC_DONELABEL,		
	IDC_DONEDATE,		
	IDC_FILEPATHLABEL,	
	IDC_FILEPATH,		
	IDC_TIMEESTLABEL,	
	IDC_TIMEEST,		
	IDC_TIMESPENTLABEL,	
	IDC_TIMESPENT,		
	IDC_RISKLABEL,		
	IDC_RISK,			
	IDC_EXTERNALIDLABEL,
	IDC_EXTERNALID,		
	IDC_COSTLABEL,
	IDC_COST,		
	IDC_DEPENDSLABEL,
	IDC_DEPENDS,		
	IDC_RECURRENCE,		
	IDC_RECURRENCELABEL,		
	IDC_VERSION,		
	IDC_VERSIONLABEL,		
	IDC_COMMENTSLABEL,	
	IDC_SPLITTER,		
	IDC_COMMENTS,		
		
	IDC_LAST,
};

enum TDC_ATTRIBUTE
{
	TDCA_NONE,
	TDCA_TASKNAME,
	TDCA_DONEDATE,
	TDCA_DUEDATE,
	TDCA_STARTDATE,
	TDCA_PRIORITY,
	TDCA_COLOR,
	TDCA_ALLOCTO,
	TDCA_ALLOCBY,
	TDCA_STATUS,
	TDCA_CATEGORY,
	TDCA_PERCENT,
	TDCA_TIMEEST,
	TDCA_TIMESPENT,
	TDCA_FILEREF,
	TDCA_COMMENTS,
	TDCA_PROJNAME,
	TDCA_FLAG,
	TDCA_CREATIONDATE,
	TDCA_CREATEDBY,
	TDCA_RISK,			// 4.6
	TDCA_EXTERNALID,	// 4.6
	TDCA_COST,			// 4.8
	TDCA_DEPENDENCY,	// 4.8
	TDCA_RECURRENCE,	// 5.1
	TDCA_VERSION,		// 5.1
};

enum // find flags
{
	FIND_TITLECOMMENTS	= 0,
	FIND_PRIORITY,
	FIND_PERCENTDONE,
	FIND_TIMEEST,
	FIND_TIMESPENT,
	FIND_STARTDATE,
	FIND_DUEDATE,
	FIND_DONEDATE,
	FIND_ALLOCTO,
	FIND_ALLOCBY,
	FIND_STATUS,
	FIND_CATEGORY,
	FIND_TASKID,
	FIND_FLAG,
	FIND_CREATIONDATE,
	FIND_CREATEDBY,
	FIND_LASTMOD,
	FIND_RISK,	
	FIND_EXTERNALID,
	FIND_COST,
	FIND_DEPENDENCY,
	FIND_VERSION,
	
	FIND_INCLUDEDONE	= 0x0100,
	FIND_MATCHCASE		= 0x0200,
	FIND_MATCHWHOLEWORD	= 0x0400,
	FIND_MATCHALLARRAY	= 0x0800,
};

enum 
{
	TDITU_MINS   = 'I',
	TDITU_HOURS  = 'H',
	TDITU_DAYS   = 'D',
	TDITU_WEEKS  = 'W',
	TDITU_MONTHS = 'M',
	TDITU_YEARS  = 'Y',
};

enum TDI_REGULARITY
{
	TDIR_ONCE,
	TDIR_DAILY,
	TDIR_WEEKLY,
	TDIR_MONTHLY,
	TDIR_YEARLY,
};

enum // weekdays
{
	TDIW_SUNDAY		= 0X01,
	TDIW_MONDAY		= 0X02,
	TDIW_TUESDAY	= 0X04,
	TDIW_WEDNESDAY	= 0X08,
	TDIW_THURSDAY	= 0X10,
	TDIW_FRIDAY		= 0X20,
	TDIW_SATURDAY	= 0X40,
};

enum TDC_SORTBY
{
	TDC_SORTUNDEF = -1,
	TDC_SORTDISABLED,
	TDC_SORTBYNAME,
	TDC_SORTBYDONEDATE,
	TDC_SORTBYDUEDATE,
	TDC_SORTBYSTARTDATE,
	TDC_SORTBYPRIORITY,
	TDC_SORTBYCOLOR,
	TDC_SORTBYALLOCTO,
	TDC_SORTBYALLOCBY,
	TDC_SORTBYSTATUS,
	TDC_SORTBYCATEGORY,
	TDC_SORTBYPERCENT,
	TDC_SORTBYTIMEEST,
	TDC_SORTBYTIMESPENT,
	TDC_SORTBYID,
	TDC_SORTBYDONE,
	TDC_SORTBYFLAG,
	TDC_SORTBYCREATIONDATE,
	TDC_SORTBYCREATEDBY,
	TDC_SORTBYLASTMOD,
	TDC_SORTBYRISK,	
	TDC_SORTBYEXTERNALID,
	TDC_SORTBYCOST,
	TDC_SORTBYVERSION,
	TDC_SORTBYRECURRENCE,
};

enum 
{
	TDCCHECKNONE		= 0x0,
	TDCCHECKPARENT		= 0x1,
	TDCCHECKCHILDREN	= 0x2,
	TDCCHECKALL			= 0x3,
};

enum 
{ 
	SET_NOCHANGE	= -1, 
	SET_FAILED		= 0, 
	SET_CHANGE		= 1 
};

enum
{
	MAX_TDPRIORITY = 10,
	MIN_TDPRIORITY = 0,
	MAX_TDRISK = 10,
	MIN_TDRISK = 0,
};

enum FILTER_TYPE
{
	FT_ALL,
	FT_NOTDONE,
	FT_DONE, 
	FT_DUETODAY,
	FT_DUETOMORROW,
	FT_DUEENDTHISWEEK, 
	FT_DUEENDNEXTWEEK, 
	FT_DUEENDTHISMONTH,
	FT_DUEENDNEXTMONTH,
	FT_DUEENDTHISYEAR,
	FT_DUEENDNEXTYEAR,
};

enum
{
	FT_ANYCATEGORY	= 0x01,
	FT_ANYALLOCTO	= 0x02,
	FT_ANYPRIORITY	= -1,
	FT_ANYRISK		= -1,
	FT_NOPRIORITY	= -2,
	FT_NORISK		= -2,
};

enum FTMATCHRESULT
{
	FTDC_MATCH,
	FTDC_NOMATCHSTATE,
	FTDC_NOMATCHCATEGORY,
	FTDC_NOMATCHALLOCTO,
	FTDC_NOMATCHPRIORITY,
	FTDC_NOMATCHALLOCBY,
	FTDC_NOMATCHSTATUS,
	FTDC_NOMATCHRISK,
};


#endif // AFX_TDCENUM_H__5951FDE6_508A_4A9D_A55D_D16EB026AEF7__INCLUDED_